﻿Ext.Loader.setConfig({
   enabled: true,
   paths: { SmartClient: 'app' }
});

Ext.apply(Ext.form.field.VTypes,
   {
      floatName: 'float',
      //  vtype validation function
      float: function (val, field)
      {
         return /^[1-9]\d*$|(^\d+\.{1}\d+$)/.test(val) && (parseFloat(val) / 1 != 0);
      },
      // vtype Text property: The error text to display when the validation function returns false
      floatText: 'Not a valid value.  Must be in the format "1" or "1.5"',
      // vtype Mask property: The keystroke filter mask
      floatMask: /[0-9]|\./ // Any digit or '.' character
   },
   {
      intName: 'int',
      int: function (val, field)
      {
         return parseInt(val) / 1 != 0;
      },
      // vtype Mask property: The keystroke filter mask
      intMask: /[0-9]/
   });

Ext.syncRequire('SmartClient.Application');
Ext.create('SmartClient.Application');